package com.example.agriapp.model;

import android.net.Uri;
import android.provider.BaseColumns;

import com.example.agriapp.data.AgriDatabaseHelper;

public class ProductContract {
    private ProductContract() {}

    public static final class ProductEntry implements BaseColumns {
        public static final Uri CONTENT_URI = 
                ProductProvider.BASE_CONTENT_URI.buildUpon()
                .appendPath(ProductProvider.PATH_PRODUCTS)
                .build();

        public static final String CONTENT_TYPE = 
                "vnd.android.cursor.dir/" + ProductProvider.AUTHORITY + "." + ProductProvider.PATH_PRODUCTS;
        public static final String CONTENT_ITEM_TYPE = 
                "vnd.android.cursor.item/" + ProductProvider.AUTHORITY + "." + ProductProvider.PATH_PRODUCTS;

        // 表名
        public static final String TABLE_NAME = AgriDatabaseHelper.TABLE_PRODUCTS;

        // 列名
        public static final String COLUMN_ID = AgriDatabaseHelper.COLUMN_ID;
        public static final String COLUMN_TITLE = AgriDatabaseHelper.COLUMN_TITLE;
        public static final String COLUMN_PRICE = AgriDatabaseHelper.COLUMN_PRICE;
        public static final String COLUMN_QUANTITY = AgriDatabaseHelper.COLUMN_QUANTITY;
        public static final String COLUMN_CATEGORY = AgriDatabaseHelper.COLUMN_CATEGORY;
        public static final String COLUMN_IMAGE = AgriDatabaseHelper.COLUMN_IMAGE;

    }
}